home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 1.iso
/
desktop
/
papcw10.zip
/
MORTGAGE.PRG
< prev
next >
Wrap
Text File
|
1995-01-22
|
673b
|
25 lines
LBL mortgage
12 prec
clrf 125,000 pv 6.875 12/ i 30 12* n pmt
12 tabset
PUTS "month\tpayment\tinterest\tprincipal\t balance\n"
PUTS "-----\t-------\t--------\t---------\t -------\n"
; do it for thirty years
1.36001 0 sto ; counter
3 rcl 6 sto ; r6 will hold balance
LBL loop
0 fix
0 rcl int 4 width putstack drop puts "\t" ; month
2 fix
4 rcl chs 7 width putstack puts "\t" ; pmt
6 rcl 2 rcl % 7 width putstack puts "\t" ; interest
- 7 width putstack puts "\t" ; principal
chs 6 rcl + 11 width putstack puts "\n" ; balance
6 sto
0 ISG
GTO loop
; cleanup
0 width drop